package cn.com.yw.controller;

import cn.com.mall.common.utils.R;
import cn.com.yw.feign.ProductFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class IndexController {
@Autowired
    ProductFeignService feignService;

    @RequestMapping("/hello")
    public String hell(){
        return "hello";
    }

    @RequestMapping(value="test",produces="application/json")
    public R test(){
        Map<String, Object> map = new HashMap<>();
        return feignService.list(map);
    }
}
